{include file="header"}
<div class="layui-fluid">
	<div class="layui-card">
		<div class="layui-card-body" style="padding: 15px;">
			<!--表单提交-->
				{if get('id',0) == '0'}
		        <form class="layui-form" url="{:url('admin/api/add_member')}" t_url="javascript:parent.location.reload();">
		        {else /}
		        <form class="layui-form" url="{:url('admin/api/edit_member')}" t_url="javascript:parent.location.reload();">
		        <input type="hidden" name="id" value="{$c.userid}">
		        <input type="hidden" name="i" value="userid">
		        {/if}
				<input type="hidden" name="model" value="member">
				<blockquote class="layui-elem-quote">基本资料</blockquote>
				<div class="layui-form-item">
					<label class="layui-form-label">昵称</label>
					<div class="layui-input-block">
						<input type="text" name="username" value="{$c.username}" style="text-align: left;" autocomplete="off" placeholder="请输入" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">邮箱</label>
					<div class="layui-input-block">
						<input type="text" name="usermail" value="{$c.usermail}" style="text-align: left;" autocomplete="off" placeholder="请输入" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
		            <label for="L_title" class="layui-form-label">头像</label>
		              <div class="layui-input-inline">
		                <input type="text" name="userhead" value="{$c.userhead|default="/public/img/touxiang.jpg"}" id="pic" placeholder="上传封面"  autocomplete="off" class="layui-input">
		                <div id="tup" style="display:none;"><img id="tupimg" src="" width="190"> </div>
		              </div>
		              <button type="button" class="layui-btn layui-btn-normal upimg" up="pic"><i class="layui-icon">&#xe64a;</i>上传头像</button>
		         </div>
				{if condition="socha(user('tid'),'99') eq '1'"}
				<div class="layui-form-item">
					<label class="layui-form-label">手机</label>
					<div class="layui-input-block">
						<input type="text" name="phone" value="{$c.phone}" style="text-align: left;" autocomplete="off" placeholder="请输入" class="layui-input">
					</div>
				</div>
				{else/}
				<div style="padding: 20px; font-size: 14px;margin-bottom:10px; background-color: #f6f6f6; color: #FF5722;"> 
			    	<span style=""><span style="">内容包含核心配置 您无权限查看</span></span>
				</div>
				{/if}
                 <div class="layui-form-item">
                   <label for="L_title" class="layui-form-label">积分</label>
                     <div class="layui-input-inline" style="width: 100px;">
                       <input type="number" name="point" value="{$c.point}" autocomplete="off" class="layui-input">
                     </div>
                 </div>
				<div class="layui-form-item">
					<label class="layui-form-label">性别</label>
					<div class="layui-input-block">
						<input type="radio" name="sex" value="1" title="男" {if $c.sex==1}checked="" {/if}> <input type="radio" name="sex" value="0" title="女" {if $c.sex==0}checked="" {/if}> </div> </div> <div class="layui-form-item">
						<label class="layui-form-label">家乡</label>
						<div class="layui-input-block">
							<input type="text" name="userhome" value="{$c.userhome}" style="text-align: left;" autocomplete="off" placeholder="请输入" class="layui-input">
						</div>
					</div>
				<div class="layui-form-item">
           	    	 <label class="layui-form-label">状态正常</label>
           	    	 <div class="layui-input-block">
            		    <input type="radio" name="open" value="1" title="是" {if $c.open==1}checked=""{/if}>
					    <input type="radio" name="open" value="0" title="否" {if $c.open==0}checked=""{/if}>
           	    	 </div>
        		  </div>
					<div class="layui-form-item layui-form-text">
						<label class="layui-form-label">介绍</label>
						<div class="layui-input-block">
							<textarea name="description" placeholder="请输入内容" class="layui-textarea">{$c.description}</textarea>
						</div>
					</div>
					<blockquote class="layui-elem-quote">后台权限管理</blockquote>
		            <!--管理员-->
					  <div class="layui-form-item">
			            <label for="L_title" class="layui-form-label">管理员</label>
			              <div class="layui-input-inline">
			                <input type="radio" name="admin" value="1" title="是" lay-filter="linktype" {if $c.admin == 1}checked=""{/if}>
							<input type="radio" name="admin" value="0" title="否" lay-filter="linktype" {if $c.admin == 0}checked=""{/if}>
			              </div>
			          </div>
					  <div class="layui-form-item" id="viewscore" {if $c.admin == 0}style="display: none;"{/if}>
			            <label for="L_title" class="layui-form-label">权限</label>
			              <div class="layui-input-block">
			                 {volist name=":guoji_vo(config('qx.name'))" id="v"}
			                 <input type="checkbox" name="tid[{$v.id}]" value="{$v.id}" title="{$v.name}" {if socha($c.tid, $v.id) == 1}checked{/if}>
                             {/volist}
			              </div>
			          </div>
					<blockquote class="layui-elem-quote">密码修改</blockquote>
					<div class="layui-form-item">
						<label class="layui-form-label">密码</label>
						<div class="layui-input-block">
							<input type="text" name="password" value="" style="text-align: left;" autocomplete="off" placeholder="留空不改" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item layui-layout-admin">
						<div class="layui-input-block">
							<div class="layui-footer" style="left: 0;">
								<button class="layui-btn" lay-submit="" lay-filter="cms">立即提交</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</div>
					</div>
			</form>
		</div>
	</div>
</div>
{include file="file"}
{include file="footer"}